home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / TELERAMA.CMD < prev    next >
Encoding:
Text File  |  1996-02-15  |  2.0 KB  |  123 lines

  1. #    TRUMPET WINSOCK LOGIN.CMD FOR TELERAMA
  2. #
  3. #trace on
  4.  
  5. # set up some strings for dialling up
  6.  
  7. if ![load $number]
  8.   if [query $number "Enter your dial up phone number"]
  9.     save $number
  10.   end
  11. end
  12. #if ![load $username]
  13. #  if [username "Enter your login username"]
  14. #    save $username
  15. #  end
  16. #end
  17. #if ![load $password]
  18. #  if [password "Enter your login password"]
  19. #    save $password
  20. #  end
  21. #end
  22.  
  23. $modemsetup = "Z"
  24. $prompt = "SLIP"
  25. $userprompt = "name:"
  26. $passprompt = "word:"
  27. $slipcmd = "y"
  28. $addrtarg = "Your address is"
  29. $pppcmd = "ppp"
  30. %attempts = 99
  31. $username = "xxxxxxx"
  32. $password = "yyyyyyy"
  33.  
  34.  
  35. #----------------------------------------------------------
  36.  
  37. # initialize modem
  38.  
  39. output "atz"\13
  40. if ! [input 10 OK\n]
  41.   display "Modem is not responding"\n
  42.   abort
  43. end
  44.  
  45. # setup our modem commands
  46.  
  47. output "at"$modemsetup\13
  48. input 10 OK\n
  49.  
  50. # send phone number
  51.  
  52. %n = 0
  53. repeat
  54.   if %n = %attempts
  55.     display "Too many dial attempts"\n
  56.     abort
  57.   end
  58.   output "atdt"$number\13
  59. #  %ok = [input 60 CONNECT]
  60.   %ok = [input 35 CONNECT]
  61.   %n = %n + 1
  62. until %ok
  63.  
  64.  input 10 \n
  65.  
  66.  
  67. #  wait till it's safe to send because some modem's hang up
  68. #  if you transmit during the connection phase
  69.  
  70.  
  71. # wait 3  dcd
  72.  
  73.  
  74. # now prod the terminal server
  75.  
  76. # output \13
  77.  
  78. #  wait for the username prompt
  79.  
  80. input 10 $userprompt
  81. output $username\13
  82.  
  83. # and the password
  84.  
  85. input 5 $passprompt
  86. output $password\13
  87.  
  88. # we are now logged in
  89.  
  90. input 15 $prompt
  91. #if %ppp
  92.   
  93.   # jump into ppp mode
  94.   
  95. #  output $pppcmd\13
  96.   
  97. #  input 30 \n
  98.   
  99. #  display "PPP mode selected.  Will try to negotiate IP address."\n
  100.   
  101. #else
  102.   
  103.   # jump into slip mode
  104.   
  105.   output $slipcmd\13
  106.   
  107.   # wait for the address string
  108. ##  
  109.   input 30 $addrtarg
  110.   
  111.   # parse address
  112. ##  
  113.   address 30
  114. ##
  115.   input 30 \n
  116.   
  117.   # we are now connected, logged in and in slip mode.
  118.   
  119.   display \n
  120.   display Connected.  Your IP address is \i.\n
  121. # end
  122.  
  123. # now we are finished.